A constraint-based partial evaluator for functional logic programs and its application
نویسنده
چکیده
The aim of this work is the development and application of a partial evaluation procedure for rewriting-based functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewriting-based computational model extends traditional functional programming languages by incorporating logical features, including logical variables and built-in search, into its framework. This work is the first to address the automatic specialisation of these functional logic programs. In particular, a theoretical framework for the partial evaluation of rewriting-based functional logic programs is defined and its correctness is established. Then, an algorithm is formalised which incorporates the theoretical framework for the procedure in a fully automatic technique. Constraint solving is used to represent additional information about the terms encountered during the transformation in order to improve the efficiency and size of the residual programs. Experiments using an implementation of the algorithm for the partial evaluation of Escher programs show that the specialiser not only passes the “KMP-test”, but also can perform the elimination of data structures and obtains notable speed-up for McCarthy’s 91-function. Circuit simulation lends itself to optimisation by partial evaluation. A general interpreted-code circuit simulator can be specialised with respect to a particular design in order to improve the simulation speed. In this work, a simulator is implemented for behavioural and register-transfer level designs written in the Verilog hardware description language. Testing and verification of high-level designs using interpreted-code simulators is notoriously inefficient. In this thesis, it is shown that the efficiency of an event-driven simulator for behavioural or register-transfer level designs can be improved automatically by partial evaluation.
منابع مشابه
Constraint-Based Partial Evaluation of Rewriting-Based Functional Logic Programs
The aim of this work is to describe a procedure for the partial evaluation of functional logic programs in rewriting-based languages using constraint-based information propagation. The partial evaluation algorithm incorporated with local and global control describes a KMP partial evaluator. We show results from the implementation of the partial evaluator in the rewriting-based functional logic ...
متن کاملSpecialization of Functional Logic Programs Based on Needed Narrowing Specialization of Functional Logic Programs Based on Needed Narrowing
Functional logic languages with a complete operational semantics are based on narrowing, a uniication-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal narrowing strategy and the basis of several recent functional logic languages. In this paper, we deene a partial evaluator ...
متن کاملConstrained Partial
Partial deduction based upon the Lloyd and Shepherdson framework generates a spe-cialised program given a set of atoms. Each such atom represents all its instances. This can severely limit the specialisation potential of partial deduction. We therefore extend the precision the Lloyd and Shepherdson approach by integrating ideas from constraint logic programming. We formally prove correctness of...
متن کاملSpecialization of Functional Logic Programs Based on Needed Narrowing ? Preliminary Version
Functional logic languages with a complete operational semantics are based on narrowing, a uniication-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal narrowing strategy and the basis of several recent functional logic languages. In this paper, we deene a partial evaluator ...
متن کاملA Partial Evaluator for Curry
We present a partial evaluator for functional logic programs written in Curry. In contrast to previous approaches to the partial evaluation of functional logic programs, we take into account the features used in contemporary Curry programs, in particular, non-deterministic operations and recursive let expressions. For this purpose, we base our partial evaluator on FlatCurry, an intermediate lan...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998